package com.winhxd.b2c.customer.dao;

import com.winhxd.b2c.common.domain.customer.condition.CustomerWithdrawalsCondition;
import com.winhxd.b2c.common.domain.customer.model.CustomerWithdrawals;
import com.winhxd.b2c.common.domain.customer.vo.CustomerWithdrawalsVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;
import java.util.List;

@Repository
public interface CustomerWithdrawalsMapper {
    int deleteByPrimaryKey(Long id);

    int insert(CustomerWithdrawals record);

    int insertSelective(CustomerWithdrawals record);

    CustomerWithdrawals selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(CustomerWithdrawals record);

    int updateByPrimaryKey(CustomerWithdrawals record);

    /**
     * 查询后台首页未审核的提现申请数
     *
     * @return
     */
    Integer selectWithdrawDepositNum();

    /**
     * 提现列表
     * @author: wangbaokuo
     * @date: 2019/1/11 17:00
     * @param:
     * @return:
     */
    List<CustomerWithdrawalsVO> findPayWithdrawals(CustomerWithdrawalsCondition condition);

    BigDecimal selectSumTodayTotalFeeByCustomerId(@Param("customerId") Long customerId);
}